import {GROUP_SEX, GROUP_STYLE, PASS_DETAILS} from '@/const/Dict'
import {PERSON_OPERA} from "@/const/personDict";

export const tableOption = {
    border: true,
    index: true,
    indexLabel: '序号',
    stripe: true,
    menuAlign: 'center',
    menuWidth: 200,
    menuType: 'button',
    align: 'center',
    emptyBtnText: '重置', //清空按钮文案
    refreshBtn: true,
    showClomnuBtn: false,
    searchSize: 'mini',
    searchMenuSpan: 4,
    searchLabelWidth: 80,
    searchSpan: 4,
    labelWidth: "20%",
    addBtn: false,
    editBtn: false,
    delBtn:false,
    viewBtn: false,
    selection: true,
    reserveSelection: true,
    props: {
        label: 'label',
        value: 'value'
    },
    column: [
        {
            label: '人员id',
            prop: 'id',
            hide: true,
        },
        {
            label: '姓名',
            prop: 'personName',
            type: 'input',
            search: true,
        }, {
            label: '学号',
            prop: 'number',
            dicData: PASS_DETAILS,
        }, {
            label: '性别',
            prop: 'sex',
            type: 'select',
            search: true,
            dicData: GROUP_SEX,
        }, {
            label: '年级/班级',
            prop: 'sysDeptId',
            search: true,
            filter: false,
            type: 'tree',
            hide: true,
            dicUrl: '/campus/sysdept/detpTree/1/2,3',
            dicMethod: 'get',
            props: {
                label: 'name',
                value: 'deptId'
            }
        },
        {
            label: '年级',
            prop: 'deptParentName',
            dicData: PASS_DETAILS,
        }, {
            label: '班级',
            prop: 'sysDeptName',
            dicData: PASS_DETAILS,
        }, {
            label: '学生属性',
            prop: 'identityKey',
            search: true,
            type: 'select',
            dicUrl: '/campus/identity/selectAll?groupNum=2',
            dicMethod: 'get',
            props: {
                label: 'name',
                value: 'id'
            },
        }, {
            label: '楼栋',
            prop: 'buildingName',
            dicData: PASS_DETAILS,
        }, {
            label: '宿舍号',
            prop: 'dormNumber',
            dicData: PASS_DETAILS,
        }, {
            width: 120,
            label: '可通行门禁',
            prop: 'grouplist',
            slot: true,
        }, {
            width: 150,
            label: '方案修改时间',
            prop: 'updateTime',
            type: 'datetime',
            format: 'yyyy-MM-dd HH:mm',
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            addDisplay: false,
            editDisplay: false,
        }, {
            width: 100,
            label: '修改操作人',
            prop: 'operator',
            dicData: PERSON_OPERA,
        }, {
            label: '状态',
            prop: 'state',
            type: 'select',
            search: true,
            slot: true,
            dicData: GROUP_STYLE,
        }
    ]
}

